<?php
declare (strict_types = 1);

namespace app\admin\model;

use think\Model;

/**
 * 后台登录日志
 *
 * @Author tanruizheng
 * @DateTime 2021-07-09
 */
class LoginLogModel extends Model
{
    //表名
    protected $name = 'login_log';

    /**
     * 保存后台登陆日志
     *
     * @Author tanruizheng
     * @DateTime 2021-07-09
     * @param [type] $username
     * @param [type] $logintime
     * @param [type] $loginip
     * @param [type] $status
     * @param [type] $password
     * @param [type] $info
     * @return void
     */
    public static function createLoginLog($username,$password,$logintime,$loginip,$status,$info = ''){
        $model = new self();
        $model->username = $username;
        $model->logintime = $logintime;
        $model->loginip = $loginip;
        $model->status = $status;
        $model->password = $password;
        $model->info = $info;
        $model->save();
        return true;
    }
}
